home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993 April: Penguin on DISC / ADC Developer CD (1993-04) (''Penguin On DISC'')_iso / Dev.CD Apr 93.iso / Utilities / MPW Interfaces 7.1 Beta / AIncludes / Components.a < prev    next >
Encoding:
Text File  |  1992-08-28  |  4.0 KB  |  76 lines  |  [TEXT/MPS ]

  1.  
  2. ; Created: Wednesday, August 14, 1991 9:33 AM
  3. ;
  4. ; File: Components.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1990-1991
  8. ; All Rights Reserved
  9. ;
  10. ;___________________________________________________________________________
  11.  IF &TYPE('__INCLUDINGCOMPONENTS__') = 'UNDEFINED' THEN
  12. __INCLUDINGCOMPONENTS__   SET 1
  13.  
  14. kAnyComponentType                                  EQU        0
  15. kAnyComponentSubType                              EQU        0
  16. kAnyComponentManufacturer                          EQU        0
  17. kAnyComponentFlagsMask                              EQU        0
  18.  
  19. cmpWantsRegisterMessage                              EQU      $80000000
  20.  
  21. ComponentDescription                              RECORD   0
  22. componentType                                     DS.L       1                       ; A unique 4-byte code indentifying the command set 
  23. componentSubType                                  DS.L       1                       ; Particular flavor of this instance 
  24. componentManufacturer                             DS.L       1                       ; Vendor indentification 
  25. componentFlags                                    DS.L       1                       ; 8 each for Component,Type,SubType,Manuf/revision 
  26. componentFlagsMask                                DS.L       1                       ; Mask for specifying which flags to consider in search, zero during registration 
  27. size                                              EQU      *
  28.                                                   ENDR
  29.  
  30. ResourceSpec                                      RECORD   0
  31. resType                                           DS.L       1                         ; 4-byte code  
  32. resId                                             DS.W       1
  33. size                                              EQU      *
  34.                                                   ENDR
  35.  
  36. ComponentResource                                 RECORD   0
  37. cd                                                DS       ComponentDescription     ; Registration parameters 
  38. component                                         DS       ResourceSpec             ; resource where Component code is found 
  39. componentName                                     DS       ResourceSpec             ; name string resource 
  40. componentInfo                                     DS       ResourceSpec             ; info string resource 
  41. componentIcon                                     DS       ResourceSpec             ; icon resource 
  42. size                                              EQU      *
  43.                                                   ENDR
  44.  
  45. ; Structure received by Component:  
  46. ComponentParameters                               RECORD   0
  47. flags                                             DS.B     1                           ; call modifiers: sync/async, deferred, immed, etc 
  48. paramSize                                         DS.B     1                           ; size in bytes of actual parameters passed to this call 
  49. what                                              DS.W       1                        ; routine selector, negative for Component management calls 
  50. params                                            DS.L     1                        ; actual parameters for the indicated routine 
  51. size                                              EQU      *
  52.                                                   ENDR
  53.  
  54.  
  55.  
  56.  
  57. ; Set Default Component flags 
  58. defaultComponentIdentical                         EQU      0
  59. defaultComponentAnyFlags                          EQU      1
  60. defaultComponentAnyManufacturer                   EQU      2
  61. defaultComponentAnySubType                        EQU      4
  62. defaultComponentAnyFlagsAnyManufacturer           EQU      defaultComponentAnyFlags+defaultComponentAnyManufacturer
  63. defaultComponentAnyFlagsAnyManufacturerAnySubType EQU      defaultComponentAnyFlags+defaultComponentAnyManufacturer+defaultComponentAnySubType
  64.  
  65.  
  66. ; errors from component manager & components
  67. invalidComponentID                                  EQU        -3000
  68. validInstancesExist                                  EQU        -3001
  69. componentNotCaptured                              EQU        -3002
  70. componentDontRegister                              EQU        -3003
  71.  
  72. badComponentInstance                              EQU        $80008001
  73. badComponentSelector                              EQU        $80008002
  74.  
  75.  
  76.                                                   ENDIF    ;   ...already included